﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_HelpList.aspx.cs"
    Inherits="V5_EShop.Admin.Admin_HelpList" MasterPageFile="~/Admin/admin.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Header" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    帮助中心
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Nav" runat="server">
    <a href="Admin_HelpList.aspx">管理帮助</a> | <a href="Admin_HelpList.aspx?Action=edit">添加帮助</a>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Content" runat="server">
    <asp:MultiView ID="MultiViewList" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                CssClass="tablelist tableheader overlist" OnRowCommand="gvList_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkitem" runat="server" />
                        </ItemTemplate>
                        <ItemStyle Width="30px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="ID" HeaderText="ID">
                        <ItemStyle Width="30px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Title" HeaderText="标题" />
                    <asp:TemplateField HeaderText="类别">
                        <ItemTemplate>
                            <%#Bind_HelpType(DataBinder.Eval(Container.DataItem,"ClassID"))%>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="100px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="AddDateTime" HeaderText="添加时间">
                        <ItemStyle Width="150px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%#Eval("ID")%>'
                                CommandName="go">修改</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument='<%#Eval("ID")%>'
                                CommandName="del">删除</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="150px" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="20"
                PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到">
            </webdiyer:AspNetPager>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table cellpadding="5" cellspacing="1" class="tablelist tableheader">
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblTitle" runat="server" Text="添加帮助"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">标题
                    </td>
                    <td>
                        <asp:TextBox ID="txtHelpTitle" runat="server" Width="346px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>类别
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlClassID" runat="server">
                            <asp:ListItem Text="请选择" Value="0"></asp:ListItem>
                            <asp:ListItem Text="新手指南" Value="1"></asp:ListItem>
                            <asp:ListItem Text="如何付款/退款" Value="2"></asp:ListItem>
                            <asp:ListItem Text="配送方式" Value="3"></asp:ListItem>
                            <asp:ListItem Text="售后服务" Value="4"></asp:ListItem>
                            <asp:ListItem Text="帮助中心" Value="5"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>内容
                    </td>
                    <td>
                       <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Height="400px"></asp:TextBox>
                       <script>
                                var editor = new wangEditor('<%=this.txtContent.ClientID%>');
                                // 普通的自定义菜单
                                editor.config.menus = [
                                    'bold',
                                    'underline',
                                    'italic',
                                    'strikethrough',
                                    'eraser',
                                    'forecolor',
                                    'bgcolor',
                                    '|',
                                    'quote',
                                    'fontfamily',
                                    'fontsize',
                                    'head',
                                    'unorderlist',
                                    'orderlist',
                                    'alignleft',
                                    'aligncenter',
                                    'alignright',
                                    '|',
                                    'link',
                                    'unlink',
                                    'table',
                                    'emotion',
                                    'insertcode',
                                    '|',
                                    'undo',
                                    'redo',
                                    'fullscreen'
                                ];
                                editor.config.codeDefaultLang = 'C#'
                                editor.create();
                            </script>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:HiddenField ID="hfID" runat="server" Value="0" />
                        <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="添加保存" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
